
class Rect implements Ishape{
    //重写接口方法
    public void draw(){
        System.out.println("矩形");
    }

}
class Flower implements Ishape{
    @Override
    public void draw() {
        System.out.println("这是花");
    }
}
/*class Student implements Comparable<Student>{
    public String name;
    public int age;
    public int score;

    public Student(String name, int age, int score) {
        this.name = name;
        this.age = age;
        this.score = score;
    }

    @Override
    public String toString() {
        return "Student{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", score=" + score +
                '}';
    }
}*/
public class Test {
    public static void drawmap(Ishape shape){
        shape.draw();
    }
    public static void main(String[] args) {
        Ishape shape=new Rect();
        Ishape shape2=new Flower();
        drawmap(shape);
    }
}
